package pl.frasunek.s2933.jps.datastore;

import edu.pjwstk.jps.datastore.IOID;

public class OIDGenerator implements IOIDGen {
    private static final long ENTRY_OID = 0l;
    private long last = ENTRY_OID;

    @Override
    public synchronized IOID entryOid() {
        return new OID(ENTRY_OID);
    }

    @Override
    public synchronized IOID generate() {

        return new OID(++last);
    }
}
